//
// utils.cpp for 202loi in /home/morel_t//Rendu/maths/202loi
// 
// Made by thomas morel
// Login   <morel_t@epitech.net>
// 
// Started on  Fri Mar  9 14:31:09 2012 thomas morel
// Last update Fri Mar  9 15:07:02 2012 thomas morel
//

#include <sstream>
#include <string>

std::string		toString(double number)
{
  std::stringstream	stream;

  stream.precision(3);
  stream.setf(std::ios::fixed, std::ios::floatfield);
  stream << number;
  return (stream.str());
}

std::string		toStringHeader(double number)
{
  std::stringstream	stream;

  stream << number;
  return (stream.str());
}

double			toDouble(const std::string &src)
{
  double		value;
  std::stringstream	stream(src);

  stream >> value;
  return (value);
}
